Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

225
Visualizações
Apache 2.4.43 is changing my url "?" to "%3F"

I have just deployed apache 2.4 and i defined a virtual host tag to redirect to a specific url. The problema is my url includes a "?" character and Apache change it to "%3F". Here is my actual Virtual host configuration tag:

<VirtualHost *:80>
  ServerName http://app2x.example.com

  RewriteEngine On
  ProxyRequests Off
  ProxyPreserveHost On
  ErrorLog "logs/app2x.example.com-error.log"
  CustomLog "logs/app2x.example.com.log" common
  ProxyPass /sib http://172.168.100.3:9097/sib/f?p=103:1
  ProxyPassReverse /sib http://172.168.100.3:9097/sib/f?p=103:1

</VirtualHost>

as you can see there is a "?" character in url, but when i test it i get next error :

/sib/f%3Fp=103:1 start: 2020-04-21T17:37:53.992Z duration: 16ms
URLMappingNotFoundException [statusCode=404, reasons=[The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured]]

I have tested with this url:

ProxyPass /sib http://172.168.100.3:9097/

and work just fine, but i need to redirect to full shown url

I am Using windows 2019 server STD Edition 64 bits with Apache 2.4.43 and the URL i am pointing to is in another similar machine.

i am new using Apache and have not found an answer on google to solve it, any help will be appreciated. Thanks

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

i have just fixed my issue (after a couple of days googling and trying), i made it work. I have to use RewriteRule as follows:

1.) my httpd-vhosts.conf file looks like this:

<VirtualHost *:80>
ServerName http://app2x.example.com

RewriteEngine On
RewriteRule ^/sib$ sib/f?p=103:1 [R=301]  # => everything that contains "/sib" redirect to url: "sib/f?p=103:1"
RewriteRule ^/([a-zA-Z0-9]+)$ sib [R=301] # => everything that contains "/any letter or number" redirect it to sib, that, at same time, will redirect it to url: "sib/f?p=103:1"

ProxyRequests Off                         # => so the server does not work as a normal proxy
ProxyPreserveHost On                      # => important to keep url format from oracle apex server, if not, will display errors when using the app because apache will change the deeper url's
ProxyPass / http://172.168.100.3:9097/    # => important do not forget this last "/"
ProxyPassReverse / http://172.168.100.3:9097/
</VirtualHost>

2.) don't forget to enable mode rewrite line in file: httpd.conf, so the previous config can work

Enable this line => LoadModule rewrite_module modules/mod_rewrite.so

Thats it!, happy coding

Majv

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda